package java期末作业;

import java.util.Scanner;

public class java2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个整数：");
        int n1 = scanner.nextInt();
        System.out.println("请输入第二个整数：");
        int n2 = scanner.nextInt();
        int s = n1 + n2;
        int d = n1 - n2;
        System.out.println("两数之和：" + s);
        System.out.println("两数之差: " + d);
        scanner.close();
    }
}